package com.lbn.baseframe.utils;

import android.support.v4.app.FragmentManager;

import com.lbn.baseframe.widget.LoadingFragment;

public class LoadingUtils {

    private LoadingUtils(){}

    private static final  String tag = "loading";

    public static void showDialog(FragmentManager fragmentManager){

        LoadingFragment loadingFragment = new LoadingFragment();
        loadingFragment.show(fragmentManager,tag);

    }

    public static void dismiss(FragmentManager fragmentManager){
        ((LoadingFragment)fragmentManager.findFragmentByTag(tag)).dismiss();
    }



}